<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/common/tagPage.jsp" %>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>订单详情页</title>
    <meta name="keywords" content="中文"/>
    <meta name="description" content="下载"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

    <!-- basic styles -->
    <link href="${baseurl}statics/assets/css/bootstrap.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="${baseurl}statics/assets/css/font-awesome.min.css"/>

    <!--[if IE 7]>
    <link rel="stylesheet" href="${baseurl}statics/assets/css/font-awesome-ie7.min.css"/>
    <![endif]-->
    <!-- fonts -->

    <link rel="stylesheet" href="${baseurl}statics/assets/css/fonts.css"/>
    <link rel="stylesheet" href="${baseurl}statics/assets/css/translateelement.css"/>

    <!-- ace styles -->

    <link rel="stylesheet" href="${baseurl}statics/assets/css/ace.min.css"/>
    <link rel="stylesheet" href="${baseurl}statics/assets/css/ace-rtl.min.css"/>
    <link rel="stylesheet" href="${baseurl}statics/assets/css/ace-skins.min.css"/>

    <!--[if lte IE 8]>
    <link rel="stylesheet" href="${baseurl}statics/assets/css/ace-ie.min.css"/>
    <![endif]-->

    <!-- inline styles related to this page -->
    <!-- 公共的js -->
    <script src="${baseurl}statics/assets/js/common.js"></script>
    <!-- ace settings handler -->

    <script src="${baseurl}statics/assets/js/ace-extra.min.js"></script>

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

    <!--[if lt IE 9]>
    <script src="${baseurl}statics/assets/js/html5shiv.js"></script>
    <script src="${baseurl}statics/assets/js/respond.min.js"></script>
    <![endif]-->

    <style>

        .form-group table{
            border: 1px solid #ccc;
            margin: 20px 0;
        }
        .form-group tr{
        border-bottom: 1px solid #ccc;
        }
        .form-group td{
            border-right: 1px solid #ccc;
            text-align: center;
            padding: 5px;
        }

    </style>


</head>

<body>

<div class="breadcrumbs" id="breadcrumbs">
    <script type="text/javascript">
        try {
            ace.settings.check('breadcrumbs', 'fixed')
        } catch (e) {
        }
    </script>

    <ul class="breadcrumb">
        <li>
            <i class="icon-home home-icon"></i>
            <a href="#">订单管理</a>
        </li>
        <li>
            <a href="${baseurl}order/findAllOrder?roleId=1&adminId=1">订单列表</a>
        </li>
        <li class="active">订单数据详情</li>
    </ul><!-- .breadcrumb -->
</div>


<div class="row order_detailbox">
    <div class="col-xs-12">
        <!-- PAGE CONTENT BEGINS -->
        <div class="form-group clearfix">
            <label class="col-sm-2 control-label no-padding-right" for="form-field-1">订单号</label>
            <div class="col-sm-9">
                <input type="text" id="form-field-1" name="name" value="${order.orderNo}" readonly="readonly"
                       />

            </div>
        </div>
        <div class="space-4"></div>
        <div class="form-group clearfix">
            <label class="col-sm-2 control-label no-padding-right">订单时间</label>
            <div class="col-sm-9">
                <input type="text" value="${fn:substring(order.applyTime,0,19)}" readonly="readonly">

            </div>
        </div>
        <div class="form-group clearfix">
            <label class="col-sm-2 control-label no-padding-right">购买者</label>
            <div class="col-sm-9">
                <input type="text" value="${order.userName} (${order.userPhone})" readonly="readonly">

            </div>
        </div>
        <div class="form-group clearfix">
            <label class="col-sm-2 control-label no-padding-right">加工工序</label>
            <div class="col-sm-9">
                <input type="text" value="<c:if test='${order.process eq "1"}'>传统</c:if>
                                          <c:if test='${order.process eq "2"}'>注塑</c:if>
                                          <c:if test='${order.process eq "3"}'>树脂一体</c:if>" readonly="readonly"/>

            </div>
        </div>
        <div class="form-group clearfix">
            <label class="col-sm-2 control-label no-padding-right">对外型号</label>
            <div class="col-sm-9">
                <input type="text" value="${order.foreignModel} " readonly="readonly">

            </div>
        </div>
        <div class="form-group clearfix">
            <label class="col-sm-2 control-label no-padding-right">订单类型</label>
            <div class="col-sm-9">
                <input type="text" value="中底" readonly="readonly">

            </div>
        </div>
        <div class="form-group clearfix">
            <label class="col-sm-2 control-label no-padding-right">商品信息</label>
            <div class="col-sm-9">
                <input type="text" value="样品：${order.model} " readonly="readonly">

            </div>
        </div>
        <div class="form-group clearfix">
            <label class="col-sm-2 control-label no-padding-right">鞋码类型</label>
            <div class="col-sm-9">
                <input type="text" value="<c:if test='${order.sizeType == 1}'>标准码</c:if>
                                          <c:if test='${order.sizeType == 2}'>欧码</c:if>
                                          <c:if test='${order.sizeType == 3}'>美码</c:if>" readonly="readonly">

            </div>
        </div>
        <div class="form-group clearfix">
            <label class="col-sm-2 control-label no-padding-right">数量（双）</label>
            <div class="col-sm-9">

               <table>
                   <tbody>
                        <tr>
                            <c:forEach items="${contractList}" var="contractList">
                                <td>${contractList.size}</td>
                            </c:forEach>
                            <td style="border: none;">合计</td>
                        </tr>
                        <tr>
                            <c:set value="0" var="sum" />
                            <c:forEach items="${contractList}" var="contractList">
                                <td>${contractList.number}</td>
                                <c:set value="${sum + contractList.number}" var="sum" />
                            </c:forEach>
                            <td style="border: none;">${sum}</td>
                        </tr>
                   </tbody>
               </table>
            </div>
        </div>

        <div class="space-4"></div>
        <div class="form-group clearfix">
            <label class="col-sm-2 control-label no-padding-right">单价</label>
            <div class="col-sm-9">
                <input type="text" value="${order.unitPrice}" readonly="readonly">

            </div>
        </div>

        <div class="space-4"></div>
        <div class="form-group clearfix">
            <label class="col-sm-2 control-label no-padding-right">合同价</label>
            <div class="col-sm-9">
                <input type="text" value="${order.contractPrice}" readonly="readonly">

            </div>
        </div>

        <div class="space-4"></div>
        <div class="form-group clearfix">
            <label class="col-sm-2 control-label no-padding-right">交期</label>
            <div class="col-sm-9">
                <input type="text" value="${fn:substring(order.deliveryTime,0,19)}" readonly="readonly">

            </div>
        </div>

        <div style="margin-bottom: 100px;" class="insole_zhongdibtn">
            <div id="inPermission">
                <a class="btn btn-purple btn-sm" href="${baseurl}order/findAllOrder?roleId=1&adminId=1"
                >返回</a>
            </div>
        </div>

    </div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.page-content -->





<script type="text/javascript">
    debugger;
    window.jQuery || document.write("<script src='${baseurl}statics/assets/js/jquery-2.0.3.min.js'>" + "<" + "/script>");
</script>

<!-- <![endif]-->

<!--[if IE]>
<script type="text/javascript">
    window.jQuery || document.write("<script src='${baseurl}statics/assets/js/jquery-1.10.2.min.js'>" + "<" + "/script>");
</script>
<![endif]-->

<script type="text/javascript">
    if ("ontouchend" in document) document.write("<script src='${baseurl}statics/assets/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
</script>
<script src="${baseurl}statics/assets/js/bootstrap.min.js"></script>
<script src="${baseurl}statics/assets/js/typeahead-bs2.min.js"></script>


<script src="${baseurl}statics/assets/js/ace-elements.min.js"></script>
<script src="${baseurl}statics/assets/js/ace.min.js"></script>

<!-- inline scripts related to this page -->

<script type="text/javascript">


    jQuery(function ($) {
//        var oTable1 = $('#sample-table-2').dataTable({
//            "aoColumns": [
//                {"bSortable": false},
//                null, null, null, null, null,
//                {"bSortable": false}
//            ]
//        });


        $('table th input:checkbox').on('click', function () {
            var that = this;
            $(this).closest('table').find('tr > td:first-child input:checkbox')
                .each(function () {
                    this.checked = that.checked;
                    $(this).closest('tr').toggleClass('selected');
                });

        });


        $('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
        function tooltip_placement(context, source) {
            var $source = $(source);
            var $parent = $source.closest('table')
            var off1 = $parent.offset();
            var w1 = $parent.width();
            var off2 = $source.offset();
            var w2 = $source.width();
            if (parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2)) return 'right';
            return 'left';
        }
    })
</script>
</body>
</html>

